<%@ include file="/includes/header_public.html"%>
<link rel="stylesheet" type="text/css" media="all" href="css/styles2.css" />
<%@ include file="/jsp/yui_includes.jsp"  %>
    	
    
<div class="home_side">
    	<div class="hm_small_wrapper">
        	<h2>User Login</h2>
            <article class="hm_small_article loginArticle">
            	<form name="form" id="login_form" method="post" action="/login">
                	<label>Email Address/Username:</label>
                    <input type="text" name="username" id="input_1"  onkeydown="keyListener(event);"/>
                    <label>Password:</label>
                    <input name="password" type="password" id="input_3"  onkeydown="keyListener(event);" /><br/><br/>
                    <label>Default View:</label>
                    <input type="radio" name="viewPreference" id="input_viewPref" value="buyer" checked/> Buyer&nbsp;&nbsp;&nbsp;
					<input type="radio" name="viewPreference" id="input_viewPref" value="supplier" /> Supplier<br/><br/>
               	</form>
					 <input type="submit" value="Login" id="tlogin-button" onclick="lg_dologin();"/>
                <a href="javascript:lg_showForgotPassword();">Forget password</a>
            </article>
			 <table width="100%" cellspacing="0" cellpadding="2" border="0">	
				
				<tr style="border: 0;" >
					<td  style="border: 0;" class="errorText" colspan="2" align="left" id='errorTextPlaceHolder'><br>&nbsp;
					<%
				String loginAttemptStatus = (String) request
						.getAttribute("loginAttemptStatus");
				String loginFailedReason = (String) request
						.getAttribute("loginFailedReason");
				
					if ("FAILED".equals(loginAttemptStatus)) {
				%> Login Failed. <%=loginFailedReason%> <%
					} else {
				%> <%
					}
				%>
					</td>
				</tr>
				<tr>		<td id="errorTextPlaceHolder" style="display:none;">
					</td>
				</tr>
			</table>
        </div>
       
    </div>
    <div class="claer_div"></div>
    
    <div  id="forgotPasswordPanel"  style="margin:15px 50px 15px 50px ;" style="dispaly:none" class="yui-skin-sam">

	<div class="hd">Forgot Password.</div>
	<div class="bd">
	    <div class="form-all">
	    	
	        
	        <div align="center">
	        	<b>Please Enter Your Email Id To Get Username and Password In Your Email </b> <br> <br>
	        	Email/Username : <input type="text" id="forgot_userName" size="30"> <br>
	        </div>
	         <br>
	          <br>
	        <div>
	        	 <div  id="cid_3" align="center">
	                    <input onclick='lg_sendForgotPasswordMail();' type="button"  value="Send Mail" >
	                    
	                     <input onclick='hideforgotPasswordPanel();' type="button" onclick="" value="Cancel" >
	              </div>
	        </div>
	        
	       
	    </div>
	    </div>
	    <div class="ft">Atscoii.com</div>
	    
	</div>
	
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript' src='dwr/interface/DWR_Register.js'></script>
<script type='text/javascript' src='dwr/interface/DWR_Validation.js'></script>
<script type="text/javascript" src="../scripts/register.js"></script>
<script type="text/javascript" src="../scripts/localutils.js"></script>
<script type="text/javascript" src="../scripts/loginpages.js"></script>

var forgot_user = new YAHOO.widget.Panel("forgotPasswordPanel", { width:"600",constraintoviewport:true,close:true,fixedcenter:true,modal:true });
forgot_user.render();
forgot_user.hide();

function lg_showForgotPassword(){
	forgot_user.show();
}

function hideforgotPasswordPanel(){
	forgot_user.hide();
}

function keyListener(e){
	if(e.keyCode == '13'){
		lg_dologin();
	}
}


</script>
